package com.jumi.microservice.controller.jd;

import com.jumi.microservice.service.jd.timingtask.TiMingTaskServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/jd")
@Api(tags = {"定时任务-京东"})
public class JdTaskController {
    @Autowired
    TiMingTaskServiceImpl tiMingTaskService;

    @PostMapping("/orderTask")
    @ApiOperation("拉取前一小时订单数据")
    public void orderTask() throws Exception {
        tiMingTaskService.orderTask();
    }

    @PostMapping("/orderTiMingTask")
    @ApiOperation("更新前一个小时的订单状态")
    public void orderTiMingTask() throws Exception {
        tiMingTaskService.orderTiMingTask();
    }
}
